﻿
Imports System.IO

Public Class comment
    Inherits xmlcontrol

    Public Const begin_tag As String = character.exclamationMark + _
                                       character.minusSign + _
                                       character.minusSign
    Public Const end_tag As String = character.minusSign + _
                                     character.minusSign
    Public Shared ReadOnly [end] As String = end_tag + xmlcontrol.tagfinal()
    Public Shared ReadOnly begin As String = xmlcontrol.tagleading() + begin_tag

    Protected Overrides Function textEncoding() As textEncodingEnum
        Return textEncodingEnum.none
    End Function

    Public Overrides Property text As Object
        Get
            Return MyBase.text()
        End Get
        Set(ByVal value As Object)
            MyBase.text = begin + value + [end]
        End Set
    End Property

    Public Sub New(Optional ByVal buff As Stream = Nothing)
        MyBase.New(buff)
    End Sub

    Public Shared Sub unittest()
        Dim inst As comment = Nothing
        inst = New comment()
        'inst.setWriter(Console.Out)
        inst.text = "this is a comment"
        'assert(inst.render())
        Console.WriteLine(inst.ToString())
    End Sub
End Class
